#ifndef FRONTCONTROLLER_H
#define FRONTCONTROLLER_H

#include <QObject>
#include <QMetaObject>
#include <QVector>
#include "gitldef.h"
#include "commandrequest.h"
#include "commandrespond.h"


typedef struct CommandFormat_s
{
    QString cCommandFormat;
    const QMetaObject* pMetaObject;
}CommandFormat;


class FrontController : public QObject
{
    Q_OBJECT
public:
    explicit FrontController(QObject *parent = 0);    
    bool processRequest( CommandRequest& rcRequest, CommandRespond& rcRespond );

protected:
    virtual bool registerCommand();
    bool xAddCommand(CommandFormat cComandFormat);


    ///< command table
    ADD_CLASS_FIELD(QVector<CommandFormat>, cCommandTable, getCommandTable, setCommandTable)


signals:

public slots:

};

#endif // FRONTCONTROLLER_H
